Object.defineProperty(exports, "__esModule", { value: !0 }),
  (exports.storageSearchPointHistory =
    exports.storageLocation =
    exports.storageIsPushCheckCard =
      void 0);
var e,
  t = require("../@babel/runtime/helpers/defineProperty"),
  r = require("../@babel/runtime/helpers/classCallCheck"),
  a = require("../@babel/runtime/helpers/createClass"),
  o = require("miniprogram-computed"),
  s = (e = require("@libs/lodash")) && e.__esModule ? e : { default: e };
var n = (function () {
  return a(
    function e(t, a) {
      r(this, e), (this.name = ""), (this.name = t), (this.initValue = a);
    },
    [
      {
        key: "set",
        value: function (e) {
          wx.setStorageSync(this.name, e);
        },
      },
      {
        key: "get",
        value: function () {
          return (
            wx.getStorageSync(this.name) || s.default.clone(this.initValue)
          );
        },
      },
      {
        key: "clean",
        value: function () {
          wx.removeStorageSync(this.name);
        },
      },
      {
        key: "behavior",
        value: function () {
          var e = this;
          return (0, o.BehaviorWithComputed)({
            data: t({}, e.name, e.get()),
            ready: function () {
              this.setData(t({}, e.name, e.get()));
            },
            watch: t({}, e.name, function (t) {
              e.set(t), console.log(t);
            }),
          });
        },
      },
    ],
  );
})();
(exports.storageIsPushCheckCard = new n("storageIsPushCheckCard")),
  (exports.storageSearchPointHistory = new n("storageSearchPointHistory", [])),
  (exports.storageLocation = new n("storageLocation"));
